package com.five.dao;

import com.five.pojo.ClubActivity;
import com.five.pojo.ClubRegister;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author lenovo
 */
@Mapper
public interface ClubActivityDao {
    @Select("select * from clubactivity")
    List<ClubActivity> getAllActivity();


    //@Select("select actName , actClub , actBeginTime , actSummarize , actPeople from clubactivity")
    List<ClubActivity> list2(String actName);

    @Insert("insert into clubregistrer(s_name , s_number , s_class) values " +
            "(#{sName} , #{sNumber} , #{sClass})")
    void addRegisterInfo(ClubRegister clubRegister);

    @Select("select * from clubregistrer where s_name=#{sName}")
    String findByName(String name);

    @Delete("delete from clubactivity where id=#{id}")
    void deleteById(Integer id);
}
